﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="urn:IOPD_V1_0.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:IOPD_V1_0.xsd" id="IOPD_V1_0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Izvjestaj">
    <xs:annotation>
      <xs:documentation>Izvejštaj o obračunanim porezima i doprinosima</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" name="Zaglavlje">
          <xs:annotation>
            <xs:documentation>Zaglavlje dokumenta</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" name="ObracunskiPeriodMjesec">
                <xs:annotation>
                  <xs:documentation>Mjesec obračunskog perioda</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:integer">
                    <xs:minInclusive value="1" />
                    <xs:maxInclusive value="12" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element minOccurs="1" name="ObracunskiPeriodGodina">
                <xs:annotation>
                  <xs:documentation>Godina obračunskog perioda</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:integer">
                    <xs:minInclusive value="1900" />
                    <xs:maxInclusive value="2100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element minOccurs="0" name="Operacija" type="type_Operacija">
                <xs:annotation>
                  <xs:documentation>Vrsta izvještaja</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="1" name="Podnosilac">
                <xs:annotation>
                  <xs:documentation>Podnosilac izvještaja</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="1" name="Podnosilac-PIB" type="type_PIB">
                      <xs:annotation>
                        <xs:documentation>PIB podnosioca</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="0" name="Podnosilac-Naziv" type="xs:string"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="1" name="Sluzbenik">
                <xs:annotation>
                  <xs:documentation>Službenik koji unosi izvještaj</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="1" name="Sluzbenik-DatumPrijema" type="xs:dateTime">
                      <xs:annotation>
                        <xs:documentation>Datum prijema (podnošenja) izvještaja</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="1" name="Poslodavac">
          <xs:annotation>
            <xs:documentation>Podaci o poslodavcu</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" name="Poslodavac-PIB" type="type_PIB"/>
              <xs:element minOccurs="0" name="Poslodavac-Naziv" type="xs:string"/>
              <xs:element minOccurs="0" name="Poslodavac-Telefon" type="xs:string"/>
              <xs:element minOccurs="0" name="Poslodavac-Email" type="xs:string"/>
              <xs:element name="Poslodavac-PunNaziv" type="xs:string" minOccurs="0"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="1" name="Ukupno">
          <xs:annotation>
            <xs:documentation>Sume pojedinačnih iznosa</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" name="Ukupno-BrojLica" nillable="true" type="xs:unsignedInt">
                <xs:annotation>
                  <xs:documentation>Broj lica za koje se podnosi izvještaj</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="1" name="Ukupno-BrutoIznos" nillable="true" type="xs:decimal">
                <xs:annotation>
                  <xs:documentation>Suma svih pojedinačnih bruto iznosa</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="1" name="TeretOsiguraonika">
                <xs:annotation>
                  <xs:documentation>Sume pojedinačnih iznosa koji su na teret osiguranika</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="1" name="TeretOsiguraonika-Porez" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa poreza</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" name="TeretOsiguraonika-PIO" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za PIO</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" name="TeretOsiguraonika-RFZO" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za RFZO</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" name="TeretOsiguraonika-ZZZ" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za ZZZ</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="1" name="TeretIsplatioca">
                <xs:annotation>
                  <xs:documentation>Sume pojedinačnih iznosa koji su na teret isplatioca</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="1" default="0" name="TeretIsplatioca-PIO" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za PIO</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" default="0" name="TeretIsplatioca-RFZO" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za RFZO</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" default="0" name="TeretIsplatioca-ZZZ" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za ZZZ</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element minOccurs="1" default="0" name="TeretIsplatioca-FondRada" nillable="true" type="xs:decimal">
                      <xs:annotation>
                        <xs:documentation>Suma pojedinačnih iznosa doprinosa za Fond rada</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="1" name="PojedinacniObracun">
          <xs:annotation>
            <xs:documentation>Pojedinačni obračun poreza i doprinosa</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="1" maxOccurs="unbounded" name="Unos" type="UnosGenericType"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="DoprinosZbogNezaposljavanjaInvalida" minOccurs="1">
          <xs:annotation>
            <xs:documentation>Obračun doprinosa zbog nezapošljavanje invalida</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="UkupanBrojZaposlenih" type="xs:int" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>Ukupan broj zaposlenih lica</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="BrojZaposlenihInvalida" type="xs:int" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>Broj zaposlenih lica sa invaliditetom</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="Osnovica" type="xs:decimal" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>Osnovica na koju se obračunava doprinos</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="Stopa" type="xs:decimal" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>Iznos stope doprinosa</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="Iznos" type="xs:decimal" minOccurs="1">
                <xs:annotation>
                  <xs:documentation>Iznos doprinosa</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="type_PIB">
    <xs:annotation>
      <xs:documentation>Tip podatka PIB - Poreski Identifikacioni Broj</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{13}|[0-9]{8}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="type_Operacija">
    <xs:annotation>
      <xs:documentation>Vrsta operacije</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="1" name="Naziv">
        <xs:annotation>
          <xs:documentation>Naziv operacije</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="osnovna"/>
            <xs:enumeration value="izmjenjena"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="UnosGenericType">
    <xs:sequence>
      <xs:element minOccurs="1" name="Unos-PIB" type="type_PIB">
        <xs:annotation>
          <xs:documentation>PIB lica</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-PrezimeIIme" type="xs:string">
        <xs:annotation>
          <xs:documentation>Prezime i ime lica</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-OsnovID" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:documentation>Šifra osnova za obračun u šifarniku</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Index" nillable="true" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Redni broj reda</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-Osnov" type="xs:string">
        <xs:annotation>
          <xs:documentation>Osnov za obračun</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-PeriodOd" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation>Početak perioda obračuna</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-PeriodDo" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation>Kraj period obračuna</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-BrutoOsnov" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Bruto iznos osnovice za obračun za jednu vrstu prihoda</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretOsiguranikaPorez" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunatog poreza na teret osiguranika</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretOsiguranikaPIO" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za PIO na teret osiguranika</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretOsiguranikaRFZO" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za RFZO na teret osiguranika</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretOsiguranikaZZZ" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za ZZZ na teret osiguranika</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretIsplatiocaPIO" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za PIO na teret isplatioca</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretIsplatiocaRFZO" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za RFZO na teret isplatioca</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretIsplatiocaZZZ" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za ZZZ na teret isplatioca</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="1" name="Unos-TeretIsplatiocaFondRada" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Iznos obračunanog doprinosa za Fond rada na teret isplatioca</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>